import React, { PureComponent } from 'react';
import { Button,WingBlank,WhiteSpace,Toast } from 'antd-mobile';
import { IndexScreenCard } from '../components/IndexScreenCard';
import { IndexScreenChart } from '../components/IndexScreenChart';
import { IndexAlarmStations } from '../components/IndexAlarmStations';
import { AppRegistry,  ScrollView, Image } from 'react-native';
import icon from '../assets/fonts/iconfont.ttf';

export class IndexScreen extends PureComponent {
    static navigationOptions = {
        tabBarLabel: '首页',
        tabBarIcon: ({tintColor}) => (
            <Image
                source={require('../assets/Images/index.png')} 
                style={{ width: 25, height: 25 }}
            />
        ),
        headerTitle: '首页',
        headerTitleStyle: { alignSelf: 'center' }
    };
    
    render() {
        // Toast.loading('Loading...', 1, () => {
        //     console.log('Load complete !!!');
        //   });
        return (
            <ScrollView>
                <WhiteSpace/>
                <WingBlank size="sm">
                <IndexScreenCard></IndexScreenCard>
                </WingBlank>
                <WingBlank size="sm">
                <IndexScreenChart></IndexScreenChart>
                </WingBlank>
                <IndexAlarmStations navigation={this.props.navigation}/>
            </ScrollView>
        );
    }
}
//通过cmd打开Android模拟器：G:\AndroidSDK\tools\emulator.exe -netdelay none -netspeed full -avd Nexus_5X_API_27